package ${packageName};

import org.fusesource.restygwt.client.MethodCallback;
import org.fusesource.restygwt.client.RestService;
import org.fusesource.restygwt.client.Options;

import cn.net.xyan.easy.gwt.client.EZGwtDispatcher;
import cn.net.xyan.easy.gwt.client.model.Pageable;
import cn.net.xyan.easy.gwt.shared.annotation.DynamicGWTObject;

import javax.ws.rs.*;



@DynamicGWTObject
public interface ${typeName} extends RestService{

<#list methods as method>

    @${method.httpMethod}
    @Path("${path}${method.path}")
    @Produces("${method.produceContentType}")
    @Consumes("${method.acceptContentType}")
    @Options(dispatcher=EZGwtDispatcher.class)
    public void ${method.methodName}(
    <#if method.requestTypeName??>
        ${method.requestTypeName} request,
    </#if>
    <#list method.pathParams as pp>
        @PathParam("${pp.path}") ${pp.typeName} ${pp.name},
    </#list>

    <#list method.headParams as hp>
        @HeaderParam("${hp.headKey}") ${hp.typeName} ${hp.name},
    </#list>

    <#if method.hasPageable>
        @HeaderParam("ez-pageable-model") Pageable pageable,
    </#if>

    MethodCallback<${method.returnTypeName}> callback);


</#list>

}